package com.jiujiu.model.DataBaseCommon;

import java.util.regex.Pattern;

/**
 * @author ZhaoJunZhou
 * @Date 2020/10/14
 */
public class SqlTypeFormat {
    public static String sqlTypeToJava(String type) {
        String lowerType = type.toLowerCase();
        //todo 补全后面的判断
        if (Pattern.matches("varchar(\\d+)?", lowerType)){
            return "String";
        } else if (Pattern.matches("int(\\d+)?",lowerType)){
            return "Int";
        }
        return "";
    }
}
